import request from "../../../utils/request";
import { AnyObjType } from "./chartsApi";

const searchApi = {
  /* 获取搜索页标题列表 */
  getSearchTitleList(){
    return request.get<any,AnyObjType>(`/hotWordBillboardCategory`)
  },

  /* 获取关键字列表 */
  getSearchKeywordsList(categoryId:number){
    return request.get<any,AnyObjType>(`/hotWordBillboard/list/2.0?categoryId=${categoryId}&size=${20}`)
  },

  /* 获取实时关键字列表 */
  getHotKeywordsList(kw:string){
    return request.get<any,AnyObjType>(`/revision/suggest?kw=${kw}&paidFilter=0`)
  }
}

export default searchApi;